# -*- coding: UTF-8 -*-
import random
rand = random.Random()
rand.seed()

def intRandom(a):
    return rand.randint(0,a)

def Clamp(x, minval = None, maxval = None):
    if minval != None:
        x = max(minval, x)
    if maxval != None:
        x = min(maxval, x)
    return x
